/*
 *Create By：Z.B
 *@DATE 2019/3/18 10:54
 *@EMAIL: 2545375@qq.com
 */
'use strict';
module.exports = app => {
  const mongoose = app.mongoose;

  const RoleSchema = new mongoose.Schema({
    name: {type: String, required: true, unique: true},
    access: {type: String, required: true, default: 'user'},
    extra: {type: mongoose.Schema.Types.Mixed},
    createAt: { type: Date, default: Date.now }
  });

  return mongoose.model('Role',RoleSchema);
};

